projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b94947
)
GtkButton: Notify on active state when (un)depressed
author
Carlos Garnacho
<carlosg@gnome.org>
Thu, 19 Aug 2010 20:47:44 +0000
(22:47 +0200)
committer
Carlos Garnacho
<carlosg@gnome.org>
Sat, 4 Dec 2010 14:38:09 +0000
(15:38 +0100)
gtk/gtkbutton.c
patch
|
blob
|
history
diff --git
a/gtk/gtkbutton.c
b/gtk/gtkbutton.c
index 71fb865f437f11c3dff75b2c7bc0df9a789a588f..beece346c12456972ba379735117c917b602855d 100644
(file)
--- a/
gtk/gtkbutton.c
+++ b/
gtk/gtkbutton.c
@@
-2246,6
+2246,18
@@
_gtk_button_set_depressed (GtkButton *button,
if (depressed != priv->depressed)
{
+ if (gtk_widget_get_realized (widget) &&
+ gtk_widget_is_drawable (widget))
+ {
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_notify_state_change (context,
+ gtk_widget_get_window (widget),
+ NULL, GTK_STATE_ACTIVE,
+ depressed);
+ }
+
priv->depressed = depressed;
gtk_widget_queue_resize (widget);
}